home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / Devices.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  27.8 KB  |  922 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Devices.a
  3. ;
  4. ;    Contains:    Device Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DEVICES__') = 'UNDEFINED' THEN
  18. __DEVICES__ SET 1
  19.  
  20.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  21.     include 'OSUtils.a'
  22.     ENDIF
  23.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  24.     include 'Files.a'
  25.     ENDIF
  26.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  27.     include 'Quickdraw.a'
  28.     ENDIF
  29.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  30.     include 'NameRegistry.a'
  31.     ENDIF
  32.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  33.     include 'CodeFragments.a'
  34.     ENDIF
  35.     IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
  36.     include 'DriverFamilyMatching.a'
  37.     ENDIF
  38.  
  39. ;  Values of the 'message' parameter to a Chooser device package 
  40.  
  41. chooserInitMsg                    EQU        11                    ; the user selected this device package 
  42. newSelMsg                        EQU        12                    ; the user made new device selections 
  43. fillListMsg                        EQU        13                    ; fill the device list with choices 
  44. getSelMsg                        EQU        14                    ; mark one or more choices as selected 
  45. selectMsg                        EQU        15                    ; the user made a selection 
  46. deselectMsg                        EQU        16                    ; the user canceled a selection 
  47. terminateMsg                    EQU        17                    ; allows device package to clean up 
  48. buttonMsg                        EQU        19                    ; the user selected a button 
  49.  
  50. ;  Values of the 'caller' parameter to a Chooser device package 
  51.  
  52. chooserID                        EQU        1
  53.  
  54. ;  Values of the 'message' parameter to a Monitor 'mntr' 
  55.  
  56. initMsg                            EQU        1                    ;initialization
  57. okMsg                            EQU        2                    ;user clicked OK button
  58. cancelMsg                        EQU        3                    ;user clicked Cancel button
  59. hitMsg                            EQU        4                    ;user clicked control in Options dialog
  60. nulMsg                            EQU        5                    ;periodic event
  61. updateMsg                        EQU        6                    ;update event
  62. activateMsg                        EQU        7                    ;not used
  63. deactivateMsg                    EQU        8                    ;not used
  64. keyEvtMsg                        EQU        9                    ;keyboard event
  65. superMsg                        EQU        10                    ;show superuser controls
  66. normalMsg                        EQU        11                    ;show only normal controls
  67. startupMsg                        EQU        12                    ;code has been loaded
  68.  
  69. ;  control codes for DeskAccessories 
  70.  
  71. goodbye                            EQU        -1                    ; heap being reinitialized 
  72. killCode                        EQU        1                    ; KillIO requested 
  73. accEvent                        EQU        64                    ; handle an event 
  74. accRun                            EQU        65                    ; time for periodic action 
  75. accCursor                        EQU        66                    ; change cursor shape 
  76. accMenu                            EQU        67                    ; handle menu item 
  77. accUndo                            EQU        68                    ; handle undo command 
  78. accCut                            EQU        70                    ; handle cut command 
  79. accCopy                            EQU        71                    ; handle copy command 
  80. accPaste                        EQU        72                    ; handle paste command 
  81. accClear                        EQU        73                    ; handle clear command 
  82. ;  Control/Status Call Codes 
  83.  
  84. drvStsCode                        EQU        8                    ; status call code for drive status 
  85. ejectCode                        EQU        7                    ; control call eject code 
  86. tgBuffCode                        EQU        8                    ; set tag buffer code 
  87. ;  miscellaneous Device Manager constants 
  88.  
  89. ioInProgress                    EQU        1                    ; predefined value of ioResult while I/O is pending 
  90. aRdCmd                            EQU        2                    ; low byte of ioTrap for Read calls 
  91. aWrCmd                            EQU        3                    ; low byte of ioTrap for Write calls 
  92. asyncTrpBit                        EQU        10                    ; trap word modifier 
  93. noQueueBit                        EQU        9                    ; trap word modifier 
  94. ;  flags used in the driver header and device control entry 
  95.  
  96. dReadEnable                        EQU        0                    ; set if driver responds to read requests 
  97. dWritEnable                        EQU        1                    ; set if driver responds to write requests 
  98. dCtlEnable                        EQU        2                    ; set if driver responds to control requests 
  99. dStatEnable                        EQU        3                    ; set if driver responds to status requests 
  100. dNeedGoodBye                    EQU        4                    ; set if driver needs time for performing periodic tasks 
  101. dNeedTime                        EQU        5                    ; set if driver needs time for performing periodic tasks 
  102. dNeedLock                        EQU        6                    ; set if driver must be locked in memory as soon as it is opened 
  103.  
  104. dNeedLockMask                    EQU        $4000                ; set if driver must be locked in memory as soon as it is opened 
  105. dNeedTimeMask                    EQU        $2000                ; set if driver needs time for performing periodic tasks 
  106. dNeedGoodByeMask                EQU        $1000                ; set if driver needs to be called before the application heap is initialized 
  107. dStatEnableMask                    EQU        $0800                ; set if driver responds to status requests 
  108. dCtlEnableMask                    EQU        $0400                ; set if driver responds to control requests 
  109. dWritEnableMask                    EQU        $0200                ; set if driver responds to write requests 
  110. dReadEnableMask                    EQU        $0100                ; set if driver responds to read requests 
  111.  
  112. ;  run-time flags used in the device control entry 
  113.  
  114. dOpened                            EQU        5                    ; driver is open 
  115. dRAMBased                        EQU        6                    ; dCtlDriver is a handle (1) or pointer (0) 
  116. drvrActive                        EQU        7                    ; driver is currently processing a request 
  117.  
  118. drvrActiveMask                    EQU        $0080                ; driver is currently processing a request 
  119. dRAMBasedMask                    EQU        $0040                ; dCtlDriver is a handle (1) or pointer (0) 
  120. dOpenedMask                        EQU        $0020                ; driver is open 
  121.  
  122. DRVRHeader                RECORD 0
  123. drvrFlags                 ds.w    1                ; offset: $0 (0)
  124. drvrDelay                 ds.w    1                ; offset: $2 (2)
  125. drvrEMask                 ds.w    1                ; offset: $4 (4)
  126. drvrMenu                 ds.w    1                ; offset: $6 (6)
  127. drvrOpen                 ds.w    1                ; offset: $8 (8)
  128. drvrPrime                 ds.w    1                ; offset: $A (10)
  129. drvrCtl                     ds.w    1                ; offset: $C (12)
  130. drvrStatus                 ds.w    1                ; offset: $E (14)
  131. drvrClose                 ds.w    1                ; offset: $10 (16)
  132. drvrName                 ds.b    1                ; offset: $12 (18) <-- really an array of length one
  133.                          ORG 20
  134. sizeof                     EQU *                    ; size:   $14 (20)
  135.                         ENDR
  136. ; typedef struct DRVRHeader *            DRVRHeaderPtr
  137.  
  138. ; typedef DRVRHeaderPtr *                DRVRHeaderHandle
  139.  
  140. DCtlEntry                RECORD 0
  141. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  142. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  143. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  144. dCtlPosition             ds.l    1                ; offset: $10 (16)
  145. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  146. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  147. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  148. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  149. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  150. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  151. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  152. sizeof                     EQU *                    ; size:   $28 (40)
  153.                         ENDR
  154. ; typedef struct DCtlEntry *            DCtlPtr
  155.  
  156. ; typedef DCtlPtr *                        DCtlHandle
  157.  
  158. AuxDCE                    RECORD 0
  159. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  160. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  161. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  162. dCtlPosition             ds.l    1                ; offset: $10 (16)
  163. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  164. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  165. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  166. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  167. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  168. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  169. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  170. dCtlSlot                 ds.b    1                ; offset: $28 (40)
  171. dCtlSlotId                 ds.b    1                ; offset: $29 (41)
  172. dCtlDevBase                 ds.l    1                ; offset: $2A (42)
  173. dCtlOwner                 ds.l    1                ; offset: $2E (46)
  174. dCtlExtDev                 ds.b    1                ; offset: $32 (50)
  175. fillByte                 ds.b    1                ; offset: $33 (51)
  176. dCtlNodeID                 ds.l    1                ; offset: $34 (52)
  177. sizeof                     EQU *                    ; size:   $38 (56)
  178.                         ENDR
  179. ; typedef struct AuxDCE *                AuxDCEPtr
  180.  
  181. ; typedef AuxDCEPtr *                    AuxDCEHandle
  182.  
  183. ;     The NDRV Driver IO Entry Point and Commands 
  184. ; typedef UInt16                         UnitNumber
  185.  
  186. ; typedef UInt32                         DriverOpenCount
  187.  
  188. ; typedef SInt16                         DriverRefNum
  189.  
  190. ; typedef SInt16                         DriverFlags
  191.  
  192. ; typedef UInt32                         IOCommandCode
  193.  
  194.  
  195. kOpenCommand                    EQU        0
  196. kCloseCommand                    EQU        1
  197. kReadCommand                    EQU        2
  198. kWriteCommand                    EQU        3
  199. kControlCommand                    EQU        4
  200. kStatusCommand                    EQU        5
  201. kKillIOCommand                    EQU        6
  202. kInitializeCommand                EQU        7                    ; init driver and device
  203. kFinalizeCommand                EQU        8                    ; shutdown driver and device
  204. kReplaceCommand                    EQU        9                    ; replace an old driver
  205. kSupersededCommand                EQU        10                    ; prepare to be replaced by a new driver
  206. kSuspendCommand                    EQU        11                    ; prepare driver to go to sleep
  207. kResumeCommand                    EQU        12                    ; wake up sleeping driver
  208.  
  209.  
  210.  
  211.  
  212. ; typedef UInt32                         IOCommandKind
  213.  
  214.  
  215. kSynchronousIOCommandKind        EQU        $00000001
  216. kAsynchronousIOCommandKind        EQU        $00000002
  217. kImmediateIOCommandKind            EQU        $00000004
  218. DriverInitInfo            RECORD 0
  219. refNum                     ds.w    1                ; offset: $0 (0)
  220. deviceEntry                 ds        RegEntryID        ; offset: $2 (2)
  221. sizeof                     EQU *                    ; size:   $12 (18)
  222.                         ENDR
  223. ; typedef struct DriverInitInfo *        DriverInitInfoPtr
  224.  
  225. DriverReplaceInfo        RECORD 0
  226. f                         ds        DriverInitInfo
  227. sizeof                     EQU *                    ; size:   $12 (18)
  228.                         ENDR
  229.  
  230.  
  231. ; typedef struct DriverInitInfo *        DriverReplaceInfoPtr
  232.  
  233. DriverFinalInfo            RECORD 0
  234. refNum                     ds.w    1                ; offset: $0 (0)
  235. deviceEntry                 ds        RegEntryID        ; offset: $2 (2)
  236. sizeof                     EQU *                    ; size:   $12 (18)
  237.                         ENDR
  238. ; typedef struct DriverFinalInfo *        DriverFinalInfoPtr
  239.  
  240. DriverSupersededInfo    RECORD 0
  241. f                         ds        DriverFinalInfo
  242. sizeof                     EQU *                    ; size:   $12 (18)
  243.                         ENDR
  244.  
  245.  
  246. ; typedef struct DriverFinalInfo *        DriverSupersededInfoPtr
  247.  
  248.  
  249. ;  Contents are command specific
  250.  
  251. IOCommandContents        RECORD 0
  252. pb                         ds.l    1                ; offset: $0 (0)
  253.                          ORG 0
  254. initialInfo                 ds.l    1                ; offset: $0 (0)
  255.                          ORG 0
  256. finalInfo                 ds.l    1                ; offset: $0 (0)
  257.                          ORG 0
  258. replaceInfo                 ds.l    1                ; offset: $0 (0)
  259.                          ORG 0
  260. supersededInfo             ds.l    1                ; offset: $0 (0)
  261. sizeof                     EQU *                    ; size:   $4 (4)
  262.                         ENDR
  263. ;  Record to describe a file-based driver candidate 
  264. FileBasedDriverRecord    RECORD 0
  265. theSpec                     ds        FSSpec            ; offset: $0 (0)        ;  file specification
  266. theType                     ds        MacDriverType    ; offset: $46 (70)        ;  nameInfoStr + version number
  267. compatibleProp             ds.b    1                ; offset: $6A (106)        ;  true if matched using a compatible name
  268. pad                         ds.b    3                ; offset: $6B (107)        ;  alignment
  269. sizeof                     EQU *                    ; size:   $6E (110)
  270.                         ENDR
  271. ; typedef struct FileBasedDriverRecord * FileBasedDriverRecordPtr
  272.  
  273. ;  Detailed Record to describe a file-based driver candidate. Includes fragment name 
  274. FileBasedDriverDetailed    RECORD 0
  275. fileBasedDriver             ds        FileBasedDriverRecord ; offset: $0 (0)
  276. fragName                 ds        Str63            ; offset: $6E (110)
  277. sizeof                     EQU *                    ; size:   $AE (174)
  278.                         ENDR
  279. ; typedef struct FileBasedDriverDetailed * FileBasedDriverDetailedPtr
  280.  
  281. ;  Driver Loader API 
  282.  
  283. ;
  284. ; extern SInt16 HigherDriverVersion(NumVersion *driverVersion1, NumVersion *driverVersion2)
  285. ;
  286.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  287.         IMPORT_CFM_FUNCTION HigherDriverVersion
  288.     ENDIF
  289.  
  290. ;
  291. ; extern OSErr VerifyFragmentAsDriver(CFragConnectionID fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  292. ;
  293.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  294.         IMPORT_CFM_FUNCTION VerifyFragmentAsDriver
  295.     ENDIF
  296.  
  297. ;
  298. ; extern OSErr GetDriverMemoryFragment(Ptr memAddr, long length, ConstStr63Param fragName, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  299. ;
  300.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  301.         IMPORT_CFM_FUNCTION GetDriverMemoryFragment
  302.     ENDIF
  303.  
  304. ;
  305. ; extern OSErr GetDriverDiskFragment(FSSpecPtr fragmentSpec, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  306. ;
  307.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  308.         IMPORT_CFM_FUNCTION GetDriverDiskFragment
  309.     ENDIF
  310.  
  311. ;
  312. ; extern OSErr GetNamedDriverDiskFragment(FSSpecPtr fragmentSpec, ConstStr63Param fragName, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  313. ;
  314.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  315.         IMPORT_CFM_FUNCTION GetNamedDriverDiskFragment
  316.     ENDIF
  317.  
  318. ;
  319. ; extern OSErr InstallDriverFromFragment(CFragConnectionID fragmentConnID, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  320. ;
  321.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  322.         IMPORT_CFM_FUNCTION InstallDriverFromFragment
  323.     ENDIF
  324.  
  325. ;
  326. ; extern OSErr InstallDriverFromFile(FSSpecPtr fragmentSpec, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  327. ;
  328.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  329.         IMPORT_CFM_FUNCTION InstallDriverFromFile
  330.     ENDIF
  331.  
  332. ;
  333. ; extern OSErr InstallDriverFromMemory(Ptr memory, long length, ConstStr63Param fragName, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  334. ;
  335.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION InstallDriverFromMemory
  337.     ENDIF
  338.  
  339. ;
  340. ; extern OSErr InstallDriverFromResource(SInt16 theRsrcID, ConstStr255Param theRsrcName, RegEntryIDPtr theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  343.         IMPORT_CFM_FUNCTION InstallDriverFromResource
  344.     ENDIF
  345.  
  346. ;
  347. ; extern OSErr InstallDriverFromDisk(Ptr theDriverName, RegEntryID *theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
  348. ;
  349.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION InstallDriverFromDisk
  351.     ENDIF
  352.  
  353. ;
  354. ; extern OSErr FindDriversForDevice(RegEntryID *device, FSSpec *fragmentSpec, DriverDescription *fileDriverDesc, Ptr *memAddr, long *length, StringPtr fragName, DriverDescription *memDriverDesc)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  357.         IMPORT_CFM_FUNCTION FindDriversForDevice
  358.     ENDIF
  359.  
  360. ;
  361. ; extern OSErr FindDriverForDeviceFromFile(RegEntryID *device, FSSpec *fragmentSpec, DriverDescription *driverDesc, StringPtr fragName)
  362. ;
  363.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  364.         IMPORT_CFM_FUNCTION FindDriverForDeviceFromFile
  365.     ENDIF
  366.  
  367. ;
  368. ; extern OSErr FindDriverCandidates(RegEntryID *deviceID, Ptr *propBasedDriver, RegPropertyValueSize *propBasedDriverSize, StringPtr deviceName, MacDriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
  369. ;
  370.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  371.         IMPORT_CFM_FUNCTION FindDriverCandidates
  372.     ENDIF
  373.  
  374. ;
  375. ; extern OSErr FindDriverCandidatesDetailed(RegEntryIDPtr deviceID, Ptr *propBasedDriver, RegPropertyValueSize *propBasedDriverSize, StringPtr deviceName, MacDriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverDetailedPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
  376. ;
  377.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  378.         IMPORT_CFM_FUNCTION FindDriverCandidatesDetailed
  379.     ENDIF
  380.  
  381. ;
  382. ; extern OSErr ScanDriverCandidates(RegEntryID *deviceID, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverRecordPtr matchingDrivers, ItemCount *nMatchingDrivers)
  383. ;
  384.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  385.         IMPORT_CFM_FUNCTION ScanDriverCandidates
  386.     ENDIF
  387.  
  388. ;
  389. ; extern OSErr ScanDriverCandidatesDetailed(RegEntryID *deviceID, FileBasedDriverDetailedPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverDetailedPtr matchingDrivers, ItemCount *nMatchingDrivers)
  390. ;
  391.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  392.         IMPORT_CFM_FUNCTION ScanDriverCandidatesDetailed
  393.     ENDIF
  394.  
  395. ;
  396. ; extern SInt16 CompareFileCandToPropCand(RegEntryID *device, StringPtr deviceName, DriverTypePtr propBasedCandidate, FileBasedDriverRecordPtr fileBasedCandidate)
  397. ;
  398.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  399.         IMPORT_CFM_FUNCTION CompareFileCandToPropCand
  400.     ENDIF
  401.  
  402. ;
  403. ; extern void GetCompatibleProperty(RegEntryID *device, StringPtr *compatibleNames, ItemCount *nCompatibleNames)
  404. ;
  405.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  406.         IMPORT_CFM_FUNCTION GetCompatibleProperty
  407.     ENDIF
  408.  
  409. ;
  410. ; extern Boolean CompatibleDriverNames(StringPtr nameInfoStr, StringPtr compatibleNames, ItemCount nCompatibleNames, long *nameCount)
  411. ;
  412.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION CompatibleDriverNames
  414.     ENDIF
  415.  
  416. ;
  417. ; extern OSErr GetDriverForDevice(RegEntryID *device, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  420.         IMPORT_CFM_FUNCTION GetDriverForDevice
  421.     ENDIF
  422.  
  423. ;
  424. ; extern OSErr InstallDriverForDevice(RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  425. ;
  426.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  427.         IMPORT_CFM_FUNCTION InstallDriverForDevice
  428.     ENDIF
  429.  
  430. ;
  431. ; extern OSErr GetDriverInformation(DriverRefNum refNum, UnitNumber *unitNum, DriverFlags *flags, DriverOpenCount *count, StringPtr name, RegEntryID *device, CFragSystem7Locator *driverLoadLocation, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescription *driverDesc)
  432. ;
  433.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION GetDriverInformation
  435.     ENDIF
  436.  
  437. ;
  438. ; extern OSErr GetDriverDescription(LogicalAddress fragmentPtr, DriverDescriptionPtr *theDriverDesc)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  441.         IMPORT_CFM_FUNCTION GetDriverDescription
  442.     ENDIF
  443.  
  444. ;
  445. ; extern OSStatus GetNamedDriverDescFromFSSpec(FSSpecPtr fragmentSpec, StringPtr fragName, DriverDescriptionPtr *driverDesc)
  446. ;
  447.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  448.         IMPORT_CFM_FUNCTION GetNamedDriverDescFromFSSpec
  449.     ENDIF
  450.  
  451. ;
  452. ; extern OSErr SetDriverClosureMemory(CFragConnectionID fragmentConnID, Boolean holdDriverMemory)
  453. ;
  454.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  455.         IMPORT_CFM_FUNCTION SetDriverClosureMemory
  456.     ENDIF
  457.  
  458. ;
  459. ; extern OSErr ReplaceDriverWithFragment(DriverRefNum theRefNum, CFragConnectionID fragmentConnID)
  460. ;
  461.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  462.         IMPORT_CFM_FUNCTION ReplaceDriverWithFragment
  463.     ENDIF
  464.  
  465. ;
  466. ; extern OSErr OpenInstalledDriver(DriverRefNum refNum, SInt8 ioPermission)
  467. ;
  468.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  469.         IMPORT_CFM_FUNCTION OpenInstalledDriver
  470.     ENDIF
  471.  
  472. ;
  473. ; extern OSErr RenameDriver(DriverRefNum refNum, StringPtr newDriverName)
  474. ;
  475.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION RenameDriver
  477.     ENDIF
  478.  
  479. ;
  480. ; extern OSErr RemoveDriver(DriverRefNum refNum, Boolean immediate)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION RemoveDriver
  484.     ENDIF
  485.  
  486. ;
  487. ; extern OSErr LookupDrivers(UnitNumber beginningUnit, UnitNumber endingUnit, Boolean emptyUnits, ItemCount *returnedRefNums, DriverRefNum *refNums)
  488. ;
  489.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  490.         IMPORT_CFM_FUNCTION LookupDrivers
  491.     ENDIF
  492.  
  493. ;
  494. ; extern UnitNumber HighestUnitNumber(void )
  495. ;
  496.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  497.         IMPORT_CFM_FUNCTION HighestUnitNumber
  498.     ENDIF
  499.  
  500. ;
  501. ; extern OSErr DriverGestaltOn(DriverRefNum refNum)
  502. ;
  503.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION DriverGestaltOn
  505.     ENDIF
  506.  
  507. ;
  508. ; extern OSErr DriverGestaltOff(DriverRefNum refNum)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  511.         IMPORT_CFM_FUNCTION DriverGestaltOff
  512.     ENDIF
  513.  
  514. ;
  515. ; extern Boolean DriverGestaltIsOn(DriverFlags flags)
  516. ;
  517.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION DriverGestaltIsOn
  519.     ENDIF
  520.  
  521.  
  522.     IF ¬ OLDROUTINELOCATIONS THEN
  523. ;
  524. ; pascal OSErr PBOpenSync(ParmBlkPtr paramBlock)
  525. ;
  526.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  527.         ; parameters:
  528.         ;    paramBlock      => A0
  529.         ; returns:
  530.         ;    OSErr           <= D0
  531.         _PBOpenSync:    OPWORD    $A000
  532.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  533.         IMPORT_CFM_FUNCTION PBOpenSync
  534.     ENDIF
  535.  
  536. ;
  537. ; pascal OSErr PBOpenAsync(ParmBlkPtr paramBlock)
  538. ;
  539.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  540.         ; parameters:
  541.         ;    paramBlock      => A0
  542.         ; returns:
  543.         ;    OSErr           <= D0
  544.         _PBOpenAsync:    OPWORD    $A400
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION PBOpenAsync
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal OSErr PBOpenImmed(ParmBlkPtr paramBlock)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         ; parameters:
  554.         ;    paramBlock      => A0
  555.         ; returns:
  556.         ;    OSErr           <= D0
  557.         _PBOpenImmed:    OPWORD    $A200
  558.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  559.         IMPORT_CFM_FUNCTION PBOpenImmed
  560.     ENDIF
  561.  
  562. ;
  563. ; pascal OSErr PBCloseSync(ParmBlkPtr paramBlock)
  564. ;
  565.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  566.         ; parameters:
  567.         ;    paramBlock      => A0
  568.         ; returns:
  569.         ;    OSErr           <= D0
  570.         _PBCloseSync:    OPWORD    $A001
  571.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  572.         IMPORT_CFM_FUNCTION PBCloseSync
  573.     ENDIF
  574.  
  575. ;
  576. ; pascal OSErr PBCloseAsync(ParmBlkPtr paramBlock)
  577. ;
  578.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  579.         ; parameters:
  580.         ;    paramBlock      => A0
  581.         ; returns:
  582.         ;    OSErr           <= D0
  583.         _PBCloseAsync:    OPWORD    $A401
  584.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  585.         IMPORT_CFM_FUNCTION PBCloseAsync
  586.     ENDIF
  587.  
  588. ;
  589. ; pascal OSErr PBCloseImmed(ParmBlkPtr paramBlock)
  590. ;
  591.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  592.         ; parameters:
  593.         ;    paramBlock      => A0
  594.         ; returns:
  595.         ;    OSErr           <= D0
  596.         _PBCloseImmed:    OPWORD    $A201
  597.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  598.         IMPORT_CFM_FUNCTION PBCloseImmed
  599.     ENDIF
  600.  
  601. ;
  602. ; pascal OSErr PBReadSync(ParmBlkPtr paramBlock)
  603. ;
  604.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  605.         ; parameters:
  606.         ;    paramBlock      => A0
  607.         ; returns:
  608.         ;    OSErr           <= D0
  609.         _PBReadSync:    OPWORD    $A002
  610.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  611.         IMPORT_CFM_FUNCTION PBReadSync
  612.     ENDIF
  613.  
  614. ;
  615. ; pascal OSErr PBReadAsync(ParmBlkPtr paramBlock)
  616. ;
  617.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  618.         ; parameters:
  619.         ;    paramBlock      => A0
  620.         ; returns:
  621.         ;    OSErr           <= D0
  622.         _PBReadAsync:    OPWORD    $A402
  623.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  624.         IMPORT_CFM_FUNCTION PBReadAsync
  625.     ENDIF
  626.  
  627. ;
  628. ; pascal OSErr PBReadImmed(ParmBlkPtr paramBlock)
  629. ;
  630.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  631.         ; parameters:
  632.         ;    paramBlock      => A0
  633.         ; returns:
  634.         ;    OSErr           <= D0
  635.         _PBReadImmed:    OPWORD    $A202
  636.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  637.         IMPORT_CFM_FUNCTION PBReadImmed
  638.     ENDIF
  639.  
  640. ;
  641. ; pascal OSErr PBWriteSync(ParmBlkPtr paramBlock)
  642. ;
  643.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  644.         ; parameters:
  645.         ;    paramBlock      => A0
  646.         ; returns:
  647.         ;    OSErr           <= D0
  648.         _PBWriteSync:    OPWORD    $A003
  649.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  650.         IMPORT_CFM_FUNCTION PBWriteSync
  651.     ENDIF
  652.  
  653. ;
  654. ; pascal OSErr PBWriteAsync(ParmBlkPtr paramBlock)
  655. ;
  656.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  657.         ; parameters:
  658.         ;    paramBlock      => A0
  659.         ; returns:
  660.         ;    OSErr           <= D0
  661.         _PBWriteAsync:    OPWORD    $A403
  662.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  663.         IMPORT_CFM_FUNCTION PBWriteAsync
  664.     ENDIF
  665.  
  666. ;
  667. ; pascal OSErr PBWriteImmed(ParmBlkPtr paramBlock)
  668. ;
  669.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  670.         ; parameters:
  671.         ;    paramBlock      => A0
  672.         ; returns:
  673.         ;    OSErr           <= D0
  674.         _PBWriteImmed:    OPWORD    $A203
  675.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  676.         IMPORT_CFM_FUNCTION PBWriteImmed
  677.     ENDIF
  678.  
  679. ;
  680. ; pascal void AddDrive(short drvrRefNum, short drvNum, DrvQElPtr qEl)
  681. ;
  682.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  683.         _AddDrive:    OPWORD    $A04E
  684.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  685.         IMPORT_CFM_FUNCTION AddDrive
  686.     ENDIF
  687.  
  688. ;
  689. ; pascal QHdrPtr GetDrvQHdr(void )
  690. ;
  691.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  692.         Macro
  693.         _GetDrvQHdr           &dest=(sp)
  694.             move.l            #$00000308,&dest
  695.         EndM
  696.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  697.         IMPORT_CFM_FUNCTION GetDrvQHdr
  698.     ENDIF
  699.  
  700.     ENDIF
  701. ;
  702. ; pascal DCtlHandle GetDCtlEntry(short refNum)
  703. ;
  704.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  705.         IMPORT_CFM_FUNCTION GetDCtlEntry
  706.     ENDIF
  707.  
  708. ;    SetChooserAlert used to simply set a bit in a low-mem global
  709. ;    to tell the Chooser not to display its warning message when
  710. ;    the printer is changed. However, under MultiFinder and System 7,
  711. ;    this low-mem is swapped out when a layer change occurs, and the
  712. ;    Chooser never sees the change. It is obsolete, and completely
  713. ;    unsupported on the PowerPC. 68K apps can still call it if they
  714. ;    wish.
  715. ;    
  716. ;    pascal Boolean SetChooserAlert(Boolean f);
  717. ;
  718. ;
  719.  
  720. ;
  721. ; pascal OSErr DriverInstall(DRVRHeaderPtr drvrPtr, short refNum)
  722. ;
  723.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  724.         ; parameters:
  725.         ;    drvrPtr         => A0
  726.         ;    refNum          => D0
  727.         ; returns:
  728.         ;    OSErr           <= D0
  729.         _DriverInstall:    OPWORD    $A03D
  730.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  731.         IMPORT_CFM_FUNCTION DriverInstall
  732.     ENDIF
  733.  
  734. ;
  735. ; pascal OSErr DriverInstallReserveMem(DRVRHeaderPtr drvrPtr, short refNum)
  736. ;
  737.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  738.         ; parameters:
  739.         ;    drvrPtr         => A0
  740.         ;    refNum          => D0
  741.         ; returns:
  742.         ;    OSErr           <= D0
  743.         _DriverInstallReserveMem:    OPWORD    $A43D
  744.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  745.         IMPORT_CFM_FUNCTION DriverInstallReserveMem
  746.     ENDIF
  747.  
  748. ;  Note: DrvrInstall() is no longer supported, becuase it never really worked anyways.
  749. ;          There will soon be a DriverInstall() which does the right thing.
  750. ;
  751. ;        DrvrRemove has been renamed to DriverRemove.  But, InterfaceLib for PowerPC
  752. ;        still exports DrvrRemove, so a macro is used to map the new name to old.
  753. ;
  754. ;
  755.  
  756. ;
  757. ; pascal OSErr DrvrRemove(short refNum)
  758. ;
  759.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  760.         ; parameters:
  761.         ;    refNum          => D0
  762.         ; returns:
  763.         ;    OSErr           <= D0
  764.         _DrvrRemove:    OPWORD    $A03E
  765.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  766.         IMPORT_CFM_FUNCTION DrvrRemove
  767.     ENDIF
  768.  
  769.  
  770. ;
  771. ; pascal OSErr PBControlSync(ParmBlkPtr paramBlock)
  772. ;
  773.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  774.         ; parameters:
  775.         ;    paramBlock      => A0
  776.         ; returns:
  777.         ;    OSErr           <= D0
  778.         _PBControlSync:    OPWORD    $A004
  779.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  780.         IMPORT_CFM_FUNCTION PBControlSync
  781.     ENDIF
  782.  
  783. ;
  784. ; pascal OSErr PBControlAsync(ParmBlkPtr paramBlock)
  785. ;
  786.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  787.         ; parameters:
  788.         ;    paramBlock      => A0
  789.         ; returns:
  790.         ;    OSErr           <= D0
  791.         _PBControlAsync:    OPWORD    $A404
  792.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  793.         IMPORT_CFM_FUNCTION PBControlAsync
  794.     ENDIF
  795.  
  796. ;
  797. ; pascal OSErr PBControlImmed(ParmBlkPtr paramBlock)
  798. ;
  799.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  800.         ; parameters:
  801.         ;    paramBlock      => A0
  802.         ; returns:
  803.         ;    OSErr           <= D0
  804.         _PBControlImmed:    OPWORD    $A204
  805.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  806.         IMPORT_CFM_FUNCTION PBControlImmed
  807.     ENDIF
  808.  
  809. ;
  810. ; pascal OSErr PBStatusSync(ParmBlkPtr paramBlock)
  811. ;
  812.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  813.         ; parameters:
  814.         ;    paramBlock      => A0
  815.         ; returns:
  816.         ;    OSErr           <= D0
  817.         _PBStatusSync:    OPWORD    $A005
  818.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  819.         IMPORT_CFM_FUNCTION PBStatusSync
  820.     ENDIF
  821.  
  822. ;
  823. ; pascal OSErr PBStatusAsync(ParmBlkPtr paramBlock)
  824. ;
  825.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  826.         ; parameters:
  827.         ;    paramBlock      => A0
  828.         ; returns:
  829.         ;    OSErr           <= D0
  830.         _PBStatusAsync:    OPWORD    $A405
  831.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  832.         IMPORT_CFM_FUNCTION PBStatusAsync
  833.     ENDIF
  834.  
  835. ;
  836. ; pascal OSErr PBStatusImmed(ParmBlkPtr paramBlock)
  837. ;
  838.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  839.         ; parameters:
  840.         ;    paramBlock      => A0
  841.         ; returns:
  842.         ;    OSErr           <= D0
  843.         _PBStatusImmed:    OPWORD    $A205
  844.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  845.         IMPORT_CFM_FUNCTION PBStatusImmed
  846.     ENDIF
  847.  
  848. ;
  849. ; pascal OSErr PBKillIOSync(ParmBlkPtr paramBlock)
  850. ;
  851.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  852.         ; parameters:
  853.         ;    paramBlock      => A0
  854.         ; returns:
  855.         ;    OSErr           <= D0
  856.         _PBKillIOSync:    OPWORD    $A006
  857.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  858.         IMPORT_CFM_FUNCTION PBKillIOSync
  859.     ENDIF
  860.  
  861. ;
  862. ; pascal OSErr PBKillIOAsync(ParmBlkPtr paramBlock)
  863. ;
  864.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  865.         ; parameters:
  866.         ;    paramBlock      => A0
  867.         ; returns:
  868.         ;    OSErr           <= D0
  869.         _PBKillIOAsync:    OPWORD    $A406
  870.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  871.         IMPORT_CFM_FUNCTION PBKillIOAsync
  872.     ENDIF
  873.  
  874. ;
  875. ; pascal OSErr PBKillIOImmed(ParmBlkPtr paramBlock)
  876. ;
  877.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  878.         ; parameters:
  879.         ;    paramBlock      => A0
  880.         ; returns:
  881.         ;    OSErr           <= D0
  882.         _PBKillIOImmed:    OPWORD    $A206
  883.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  884.         IMPORT_CFM_FUNCTION PBKillIOImmed
  885.     ENDIF
  886.  
  887. ;
  888. ; pascal short OpenDeskAcc(ConstStr255Param deskAccName)
  889. ;
  890.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  891.         _OpenDeskAcc:    OPWORD    $A9B6
  892.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  893.         IMPORT_CFM_FUNCTION OpenDeskAcc
  894.     ENDIF
  895.  
  896. ;
  897. ; pascal void CloseDeskAcc(short refNum)
  898. ;
  899.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  900.         _CloseDeskAcc:    OPWORD    $A9B7
  901.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  902.         IMPORT_CFM_FUNCTION CloseDeskAcc
  903.     ENDIF
  904.  
  905. ;    The PBxxx() routines are obsolete.  
  906. ;    
  907. ;    Use the PBxxxSync(), PBxxxAsync(), or PBxxxImmed version instead.
  908. ;
  909.  
  910.  
  911.     IF ¬ OLDROUTINELOCATIONS THEN
  912.     ENDIF
  913.  
  914.  
  915.  
  916.  
  917.     ENDIF ; __DEVICES__ 
  918.  
  919.